<template>
  <view class="container">
    <view class="header">
      <uni-icons type="left" size="23" style="vertical-align: middle" @click="goback"></uni-icons>
      <text style="font-size: 36rpx; font-family: PingFang SC, PingFang SC; font-weight: bold; color: #222222; padding-left: 20rpx">{{ agreement.name }}</text>
    </view>
    <view class="text">
      <rich-text :nodes="agreement.content"></rich-text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      agreement: {}
    };
  },
  onLoad() {
    this.getacticlexy();
  },
  methods: {
    // 获取文章协议
    async getacticlexy() {
      const res = await uni.$http.get('index/getArticle');
      console.log('文章协议------', res.data.data[0]);
      this.agreement = res.data.data[0];
    },
    goback() {
      uni.navigateBack();
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  box-sizing: border-box;
  .header {
    margin-top: 60rpx;
    margin-left: 30rpx;
  }
  .text {
    box-sizing: border-box;
    margin: 20rpx 30rpx;
  }
}
</style>
